home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 23.zip
/
BS1 part 23
/
Prof page II type.adf
/
Install
/
InsFont
< prev
next >
Wrap
AmigaDOS Script File
|
1990-08-10
|
2KB
|
52 lines
.KEY fontName/A,fontDir/A
.BRA {
.KET }
; Install a font (family). fontName is the name we show the user.
; fontDir is the pathname of the directory where the font can be found.
; The font will be installed to GD_Dest:.
;
; If there is room in GD_Dest: for the font, we ask the user whether it
; should be installed.
;instutil >GD_TempDir:free freespace GD_Dest:
instutil >GD_TempDir:size dirsize {fontDir}
;instutil -eGDIFREE join GD_TempDir:free
instutil -eGDISIZE join GD_TempDir:size
echo " "
echo noline " {fontName} ("
copy ENV:GDISIZE * ; TYPE without the trailing newline
echo " disk blocks):"
; We want to leave one block free, but the size we'll occupy is actually
; GDISIZE-1 (since the source includes a directory which won't
; be created). These two off-by-one's cancel.
if val $GDISIZE gt $GDIFREE
echo "*E[;33m Not enough disk space available.*E[m"
skip InsExit
endif
instutil ask -dy " Install [Y/N]? Y"
if warn
echo " {fontName} not installed"
skip InsExit
endif
; We've passed all the hurdles -- install the thing.
failat 21
echo " Installing {fontName}"
execute GD_SourceDisk:Install/RamCopy {fontDir} GD_Dest: " {fontName}" "installed"
; Since GD_Dest: has (potentially) changed, update the free-space count.
instutil >GD_TempDir:free freespace GD_Dest:
instutil -eGDIFREE join GD_TempDir:free
lab InsExit
failat 10